package com.example.mybaties.testone.service;

import com.example.mybaties.testone.domain.SysUser;
import com.example.mybaties.testone.mapper.UserMapper;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public SysUser findUserByUserName(String userName) {
        return userMapper.selectUserByName(userName);
    }

    @Override
    public SysUser findUserContainsRoleAndPrivilegeByName(String name) {
        return userMapper.selectUserContainsRoleAndPrivilegeByName(name);
    }
}
